<template>
	<view>
		<!-- 顶部信息 -->
		<blog-mine-header :login-flag="loginFlag"></blog-mine-header>
		<!-- 闲言碎语 -->
		<view class="xianyan-container">
			<view class="xianyan-xianyan-container">
				<text class="xianyan-xianyan-text">闲言</text>
				<view class="xianyan-xianyan-xianyan-container">
					<text class="xianyan-xianyan-xianyan-text">兴趣使然的无名小站</text>
				</view>
			</view>
			<view class="xianyan-suiyu-container">
				<text class="xianyan-suiyu-text">碎语</text>
				<view class="xianyan-suiyu-suiyu-container">
					<text class="xianyan-suiyu-suiyu-text">关注关注呗</text>
				</view>
			</view>
		</view>
		<!-- 菜单 -->
		<blog-mine-menu></blog-mine-menu>
		<!-- 版权信息 -->
		<copyright></copyright>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				loginFlag: false // 判断是否登录，默认没登录false
			}
		},
		onShow() {
			// 获取token，如果token存在，设置loginFlag为true
			const token = uni.getStorageSync('Authorization');
			if(token) {
				// 存在token存在，登录了
				this.loginFlag = true;
			}
		},
		onPullDownRefresh() {
			uni.reLaunch({
				url: '/pages/mine/mine'
			})
			uni.stopPullDownRefresh();
		},
		methods: {
			
		}
	}
</script>

<style>
@import url("./index.css");
</style>
